<ion-view>
  <ion-header-bar class="bar bar-header header">
    <button on-touch="goback()" class="button return-btn">返回</button>
    <label class="item-input-wrapper hd-find-box">
      <i class="icon hd-find-icon"></i>
      <input type="search" ng-focus="go2search()" class="hd-find-text" placeholder="请输入关键字搜索酒款">
    </label>
    <button class="button pull-right hd-code-btn" ui-sref="barcodeSearch"></button>
  </ion-header-bar>
  <div class="bar bar-subheader gray-bg">
    <div class="tabs tads-nav">
      <a on-touch="showAll()" class="tab-item" ng-class="{'active':showWhich[0]}">全部</a>
      <a on-touch="showBComment()" class="tab-item" ng-class="{'active':showWhich[1]}">评论优先</a>
      <a on-touch="showBCollect()" class="tab-item" ng-class="{'active':showWhich[2]}">收藏优先</a>
      <a on-touch="showBDetail()" class="tab-item" ng-class="{'active':showWhich[3]}">精细查找<i class="tads-nav-icon"></i></a>
    </div>
  </div>
  <ion-content  class="gray-bg has-subheader has-footer" has-bouncing="true" on-touch="touchIndex()" on-swipe-left="swipeLeft()" on-swipe-right="swipeRight()">

    <tab-slide-box tab="0">
      <ion-slide-box show-pager="false" on-slide-changed="slideHasChanged($index)" delegate-handle="delegate-handle">
        <ion-slide>
            <ion-content class="gray-bg">
              <!--全部酒款-->
              <div class="list">
                <ul>
                  <li class="item myitem-checkbox product-item" ng-repeat="item in allWineList">
                    <label class="mycheckbox" on-touch="selectAllWine($index)">
                      <em class="product-item-checkbox" ng-class="{'active':item.selected}">
                        <input type="checkbox"/>
                      </em>
                    </label>
                    <a ng-href="#/winedetails/{{item.wine_id}}" class="item item-thumbnail-left product-item-list">
                      <div class="product-item-pic"><img ng-src="{{picPath}}{{item.wine_img_url}}" alt=""/></div>
                      <h3 ng-bind="item.wine_cn_name"></h3>
                      <p class="product-item-eng" ng-bind="item.wine_en_name"></p>
                      <p class="product-item-from">{{item.country_cn_name}}<span ng-if="item.wine_year&&item.wine_year!=''&&item.wine_year!='+'&&item.wine_year!='﹢'&&item.wine_year!='NV'">，{{item.wine_year}}</span></p>
                      <p>参考价：<em class="product-item-money">¥ {{getFormatNum(item.wine_price)}}<span class="product-money-tips">仅供参考</span></em></p>
                    </a><!-- ng-class="{'showRefer':showRefer}"-->
                  </li>
                </ul>
              </div>
              <ion-infinite-scroll
                on-infinite="loadMoreAll()"
                ng-if="allWineHasNextPage()"
                distance="1%"></ion-infinite-scroll>
            </ion-content>
        </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <!--评论优先-->
            <div class="list">
              <ul>
                <li class="item myitem-checkbox product-item" ng-repeat="item in comentWineList">
                  <label class="mycheckbox"  on-touch="selectCommentWine($index)">
                    <em class="product-item-checkbox" ng-class="{'active':item.selected}">
                      <input value="item.wine_id" type="checkbox"/>
                    </em>
                  </label>
                  <a ng-href="#/winedetails/{{item.wine_id}}" class="item item-thumbnail-left product-item-list">
                    <div class="product-item-pic"><img ng-src="{{picPath}}{{item.wine_img_url}}" alt=""/></div>
                    <h3 ng-bind="item.wine_cn_name"></h3>
                    <p class="product-item-eng" ng-bind="item.wine_en_name"></p>
                    <p class="product-item-from">{{item.country_cn_name}}<span ng-if="item.wine_year&&item.wine_year!=''&&item.wine_year!='+'&&item.wine_year!='NV'">，{{item.wine_year}}</span></p>
                    <p>参考价：<em class="product-item-money" ng-class="{'showRefer':showRefer}">¥ {{getFormatNum(item.wine_price)}}<span class="product-money-tips">仅供参考</span></em></p>
                  </a><!-- -->
                </li>
              </ul>
            </div>
            <ion-infinite-scroll
              on-infinite="loadMoreComment()"
              ng-if="commentFHasNextPage()"
              distance="1%"></ion-infinite-scroll>
          </ion-content>
        </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <!--收藏优先-->
            <div class="list">
              <ul>
                <li class="item myitem-checkbox product-item" ng-repeat="item in collectWineList">
                  <label class="mycheckbox" on-touch="selectCollectWine($index)">
                    <em class="product-item-checkbox" ng-class="{'active':item.selected}">
                      <input value="item.wine_id" type="checkbox"/>
                    </em>
                  </label>
                  <a ng-href="#/winedetails/{{item.wine_id}}" class="item item-thumbnail-left product-item-list">
                    <div class="product-item-pic"><img ng-src="{{picPath}}{{item.wine_img_url}}" alt=""/></div>
                    <h3 ng-bind="item.wine_cn_name"></h3>
                    <p class="product-item-eng" ng-bind="item.wine_en_name"></p>
                    <p class="product-item-from">{{item.country_cn_name}}<span ng-if="item.wine_year&&item.wine_year!=''&&item.wine_year!='+'&&item.wine_year!='NV'">，{{item.wine_year}}</span></p>
                    <p>参考价：<em class="product-item-money" ng-class="{'showRefer':showRefer}">¥ {{getFormatNum(item.wine_price)}}<span class="product-money-tips">仅供参考</span></em></p>
                  </a>
                </li>
              </ul>
            </div>
            <ion-infinite-scroll
              on-infinite="loadMoreCollect()" ng-if="collectFHasNextPage()" distance="1%"></ion-infinite-scroll>
          </ion-content>
        </ion-slide>
        <ion-slide>
          <ion-content class="gray-bg">
            <!--精细搜索开始-->
            <div>
              <div class="search-item-tit">
                <button class="search-tit-btn fr" type="button" on-touch="extend(0)" ng-bind="isOpens[0].text">展开</button>国家</div>
              <div class="search-item-con">
                <ul class="row row-wrap">
                  <li class="col-25" ng-repeat="item in countryList | limitTo: isOpens[0].count">
                    <a ng-class="{'cur':item.selected}" on-touch="selectCountry($index)">
                <span class="search-li-pic">
                  <img ng-src="{{picPath}}{{item.country_img_url}}" alt=""/>
                </span>
                      <em class="search-li-tit" ng-bind="item.country_cn_name"></em>
                    </a>
                  </li>
                </ul>
              </div>
              <!--国家结束-->
              <div class="search-item-tit"><button class="search-tit-btn fr" type="button" on-touch="extend(1)" ng-bind="isOpens[1].text">展开</button>类型</div>
              <div class="search-item-con">
                <ul class="row row-wrap">
                  <li class="col-25" ng-repeat="item in typeList | limitTo: isOpens[1].count">
                    <a ng-class="{'cur':item.selected}" on-touch="selectType($index)">
                <span class="search-li-pic">
                  <img ng-src="{{picPath}}{{item.type_img_url}}" alt=""/>
                </span>
                      <em class="search-li-tit" ng-bind="item.type_cn_name"></em>
                    </a>
                  </li>
                </ul>
              </div>
              <!--类型结束-->
              <div class="search-item-tit"><button class="search-tit-btn fr" type="button" on-touch="extend(2)" ng-bind="isOpens[2].text">展开</button>饮用场合</div>
              <div class="search-item-con">
                <ul class="row row-wrap">
                  <li class="col-25" ng-repeat="item in occasionList | limitTo: isOpens[2].count">
                    <a ng-class="{'cur':item.selected}" on-touch="selectOccasion($index)">
                <span class="search-li-pic">
                  <img ng-src="{{picPath}}{{item.situation_img_url}}" alt=""/>
                </span>
                      <em class="search-li-tit" ng-bind="item.situation_name">商务宴请</em>
                    </a>
                  </li>
                </ul>
              </div>
              <!--试饮场合结束-->
              <div class="search-item-tit"><button class="search-tit-btn fr" type="button" on-touch="extend(3)" ng-bind="isOpens[3].text">展开</button>价格区间</div>
              <div class="search-item-con">
                <ul class="row row-wrap">
                  <li class="col-33" ng-repeat="item in priceList | limitTo: isOpens[3].count">
                    <a on-touch="selectedMoney($index)"><em class="search-li-money" ng-class="{'cur':item.selected}" ng-bind="item.text"></em></a>
                  </li>
                </ul>
              </div>
              <div class="padding">
                <button class="button button-full claret-red-btn" type="button" on-touch="searchByDetail()">完成</button>
              </div>
            </div>
            <!--精搜索结束--->
          </ion-content>
        </ion-slide>
        </ion-slide-box>
      </tab-slide-box>
  </ion-content>
  <ion-footer-bar class="bar bar-footer footer-txt footer-white" ng-show="!showWhich[3]">
    <label class="mt5" style="width:60px">
      <em class="footer-checkbox" ng-class="{'active':bottomCheckBoxSelected}" on-touch="selectAllBottom()">
        <input type="checkbox"/>
      </em>
      全选
    </label>
    <span class="mlr10">已选择<em class="product-fix-num" ng-bind="selectWineCount" style="color:#970b34;">0</em>款酒</span>
    <button class="button button-small pull-right claret-red-btn" type="button" on-touch="addToWineRecommend()">加入酒单</button>
  </ion-footer-bar>
</ion-view>
